﻿namespace UnityEditor
{
    using System;
    using System.Runtime.CompilerServices;
    using UnityEngine;

    internal sealed class UploadingBuildsUtility
    {
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal static extern UploadingBuild[] GetUploadingBuilds();
        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal static extern void RemoveUploadingBuild(string displayName);
        internal static bool ResumeBuildUpload(string displayName)
        {
            return ResumeBuildUpload(displayName, true);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal static extern bool ResumeBuildUpload(string displayName, bool replace);
        internal static void UploadBuild(string buildPath, bool autoRun)
        {
            UploadBuild(buildPath, 0, autoRun);
        }

        internal static void UploadBuild(string buildPath, int overwriteHandling, bool autoRun)
        {
            UploadBuild(buildPath, PlayerSettings.productName, overwriteHandling, autoRun);
        }

        [MethodImpl(MethodImplOptions.InternalCall), WrapperlessIcall]
        internal static extern void UploadBuild(string buildPath, string displayName, int overwriteHandling, bool autoRun);
    }
}

